<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:t="http://myfaces.apache.org/tomahawk"
	template="adminTemplate.xhtml">


	<ui:define name="pageIntro">
		<h2>Create an Action Path Element</h2>
		<p class="lftText">Use this form to create an <span>action
		path element</span>.<br />
		<span>Warning:</span>Normally you should not see this form. This form
		should only be used for maintaining and debugging. The operations done
		here are supposed to happen automatically as you edit action-paths.<br/>
		<span>Action path elements</span> are element of action path that has
		a reference to action, navigation between actions, listeners for
		actions and role restrictions.</p>
	</ui:define>

	<ui:define name="mainForm">
		<h:form id="crtActParhForm">
			<h:panelGrid columns="2">
				<h:outputLabel for="crtActPathElActionPath" value="Task Type"></h:outputLabel>
				<h:selectOneMenu id="crtActPathElActionPath"
					value="#{createActionPathElement.actionPathElement.actionPath}"
					converter="#{actionPathConverter}">
					<t:selectItems id="crtActPathElActionPathItms" var="actionPath"
						value="#{listActionPath.actionPaths}"
						itemLabel="#{actionPath.name}" itemValue="#{actionPath}" />
				</h:selectOneMenu>

				<h:outputLabel for="crtActPathElOrd" value="Order"></h:outputLabel>
				<h:inputText id="crtActPathElOrd"
					value="#{createActionPathElement.actionPathElement.order}"></h:inputText>

				<h:outputLabel for="crtActPathElActs" value="Action"></h:outputLabel>
				<h:selectOneMenu id="crtActPathElActs"
					value="#{createActionPathElement.actionPathElement.action}"
					converter="#{actionConverter}">
					<t:selectItems var="action" value="#{listAction.actions}"
						itemLabel="#{action.name}" id="crtActPathActItms"
						itemValue="#{action}" />
				</h:selectOneMenu>

				<h:outputLabel for="crtActPathElRoles" value="Roles"></h:outputLabel>
				<h:selectManyMenu id="crtActPathElRoles"
					value="#{createActionPathElement.actionPathElement.roles}"
					converter="#{roleConverter}">
					<t:selectItems var="role" value="#{listRole.roles}"
						itemLabel="#{role.name}" itemValue="#{role}"
						id="crtActPathElRoleItms" />
				</h:selectManyMenu>

			</h:panelGrid>
			<h:commandButton value="Save" id="crtActPathElSbt"
				action="#{createActionPathElement.save}"></h:commandButton>
		</h:form>
	</ui:define>
</ui:composition>
